//
//  WXLPlayVideoTableViewCell.m
//  段子手
//
//  Created by dllo on 16/3/24.
//  Copyright © 2016年 JokesTeam. All rights reserved.
//

#import "WXLPlayVideoTableViewCell.h"

@interface WXLPlayVideoTableViewCell ()

@property (nonatomic, retain) UIImageView *bigImage; /**< 大图 */
@property (nonatomic, retain) UILabel *titleLabel; /**< 歌名 */
@property (nonatomic, retain) UILabel *singerNamkeLabel; /**< 歌手名 */

@end

@implementation WXLPlayVideoTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubView];
    }
    return self;
}



- (void)setModel:(WXLSongsModel *)model {
    _model = model;
}


- (void)createSubView {
    self.bigImage = [[UIImageView alloc] init];
    [self addSubview:_bigImage];
    
    self.titleLabel = [[UILabel alloc] init];
    [self addSubview:_titleLabel];
    _titleLabel.backgroundColor = [UIColor clearColor];
    _titleLabel.font = [UIFont systemFontOfSize:16];
    
    self.singerNamkeLabel = [[UILabel alloc] init];
    [self addSubview:_singerNamkeLabel];
    _singerNamkeLabel.backgroundColor = [UIColor clearColor];
    _singerNamkeLabel.font = [UIFont systemFontOfSize:15];
    _singerNamkeLabel.textColor = [UIColor lightGrayColor];
}



- (void)layoutSubviews {
    [super layoutSubviews];
    _bigImage.frame = CGRectMake(10, 10, (kUIScreenWidth - 20) / 2, 100);
    [_bigImage HANDLEIMAGE(_model.mvListImg)];
    
    _titleLabel.frame = CGRectMake(_bigImage.frame.size.width + 10 + 10, 20, _bigImage.frame.size.width - 10, (_bigImage.frame.size.height - 20) / 2);
    _titleLabel.text = _model.videoName;
    
    _singerNamkeLabel.frame = CGRectMake(_titleLabel.frame.origin.x, _titleLabel.frame.size.height + 20, _titleLabel.frame.size.width, _titleLabel.frame.size.height);
    _singerNamkeLabel.text = _model.singerName;
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
